# 代码所有：cxw
# 开发时间：2021/11/7 22:41

# from collections import OrderedDict
# favorite_languages=OrderedDict()
# favorite_languages["jen"]="python"
# favorite_languages["sara"]="c"
# favorite_languages["jack"]="java"
# for name,language in favorite_languages.items():  #python 字典(Dictionary) items() 函数以列表返回可遍历的(键, 值) 元组数组。
#     print(name.title()+" "+language.title())

# #使用OrderdDict()类表示词汇表
# from collections import OrderedDict
# word_name=OrderedDict()
# word_name["1."]="challeage"
# word_name["2."]="abundant"  #大量的
# word_name["3."]="abandon"   #放弃
# for num,word in word_name.items():
#     print(num.title()+" "+word.title())

#骰子
#生成随机数
# import random
# s=random.randint(1,6)   #导入random类使用randint()方法，生成一个指定范围的整数
# print(s)

from random import randint
class Die():
    def __init__(self,sides=6):
        self.side=sides
    def roll_die(self):
        x=randint(1,6) #打印1和骰子之间的随机数
        print(x)
    def touzi(self,sd,n):
        self.m=sd
        self.num=n
        for sd in range(n):
            print(sd,end=" ")
tz=Die()
tz.roll_die()
tz.touzi(6,10)
tz.touzi(20,10)
